<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/customQuery.css?v=${ver}" rel="stylesheet" type="text/css" media="screen" />
<form class="activiti-form uiComplete" method="post" action="" onsubmit="return navTabSearch(this)">
	<input type="hidden" name="navTabId" id="navTabId" value="${navTabId!''}"> <input type="hidden" name="businessType" id="businessType" value="${businessType!''}"> <input type="hidden" id="screenName" value="${queryScreen.screenName!''}">
	<header class="saved-search-selector">
		<div class="header-section-primary">
			<h1>${queryScreen.screenName!''}</h1>
			<label class="shareFlag"><input type="checkbox" id="shareFlag" value="1"<#if queryScreen.shareFlag==1>checked</#if>><@label key="shareFlag.C">共享</@label></label>
			<ul class="filter-operations">
				<#if pattern=="edit">
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="button" id="saveQuery">保存</button>
						</div>
					</div>
				</li> </#if>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="button" id="otherSave">另存为</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</header>
	<div class="search-criteria-container">
		<div class="search-criteria">
			<ul class="criteria-list">
				<#if screenConfig??&&screenConfig.queryConditions?? > <@createBar queryConditions=screenConfig.queryConditions ismore=0/> </#if>
				<li class="condition" field=""><a href="#" class="drop">更多</a>
					<div class="dropdown">
						<div class="aui-list-scroll" tabindex="-1" role="presentation">
							<h5>所有条件</h5>
							<ul id="all-condition" class="aui-list-section aui-last" aria-label="所有条件">
								<#if conditions??> <#list conditions as condition>
								<li class="check-list-item"><label class="item-label" title="${condition.fieldLabel!''}" data-descriptor-title="${condition.fieldLabel!''}"><input type="checkbox" control-type="${condition.dataType!''}" value="${condition.dbField!''}" businessField="${condition.businessField!''}">${condition.fieldLabel!''}</label></li> </#list> </#if>
							</ul>
						</div>
					</div></li>
				<li class="query-button">
					<button id="queryBtn" class="aui-button aui-button-subtle search-button" type="button" original-title="搜索">
						<span class="aui-icon aui-icon-small aui-iconfont-search"></span>
					</button>
				</li>

			</ul>
			<ul class="criteria-list criteria-list-info-bar">
				<li class="condition" field=""><a href="#" class="drop">列</a>
					<div id="drop-column" class="dropdown dropdown-info-bar">
						<div class="aui-list-scroll" tabindex="-1" role="presentation">
							<h5>所有列</h5>
							<ul id="所有条件" class="aui-list-section aui-last" aria-label="所有条件">
								<#if allFields??> <#list allFields as condition>
								<li class="check-list-item"><label class="item-label" title="${condition.fieldLabel!''}" data-descriptor-title="${condition.fieldLabel!''}"> <input type="checkbox"<#if condition.checkedFlag==1>checked</#if> tabindex="${condition.dataType!''}" value="${condition.dbField!''}" >${condition.fieldLabel!''}
								</label></li> </#list> </#if>
							</ul>
						</div>
						<div class="column-btn-bar">
							<div class="column-btn">
								<div class="buttonActive" id="save">
									<div class="buttonContent">
										<button id="column-ok" type="button">确定</button>
									</div>
								</div>
							</div>
						</div>
					</div></li>

			</ul>
		</div>
		<div class="search-criteria-extended">
			<ul class="criteria-list"><#if screenConfig??&&screenConfig.moreQueryConditions?? > <@createBar queryConditions=screenConfig.moreQueryConditions ismore=1/> </#if>
			</ul>
		</div>
	</div>
	<div class="list-view">
		<table id="table" class="table" width="100%" layoutH="176" style="overflow: scroll;">
			<thead>
				<tr id="head" class="sortDrag">
					<#if allFields??> <#list allFields as condition>
					<th width="200" field="${condition.dbField!''}" dataType="${condition.dataType!''}"<#if condition.checkedFlag==1>visible</#if>>${condition.fieldLabel!''}</th> </#list> </#if>
				</tr>
			</thead>
			<tbody id="tbody">
				<#if data??><#if (data?size>0)> <#list data as row>
				<tr>
					<#if allFields??> <#list allFields as condition>
					<td field="${condition.dbField!''}">
					<#if condition.dataType=="DATE">
					<#if row["${condition.dbField!''}"]??>${row["${condition.dbField!''}"]?string("yyyy-MM-dd")}</#if>
					<#elseif condition.dataType=="DATETIME">
					<#if row["${condition.dbField!''}"]??>${row["${condition.dbField!''}"]?string("yyyy-MM-dd HH:mm:ss")}</#if>
					<#else>${row["${condition.dbField!''}"]}</#if>
					</td> 
					</#list></#if>
				</tr>
				</#list> <#else>
				<tr>
					<td colspan="20" class="noData">======列表无数据=====</font>
					</td>
				</tr>
				</#if> <#else>
				<tr>
					<td colspan="20" class="noData">======列表无数据=====</font>
					</td>
				</tr>
				</#if>
			</tbody>
		</table>
		<div class="panelBar">
			<div class="pages">
				<span><@label key="pagePanelShow.C">显示</@label></span> <select class="combox" name="numPerPage"> 
					<option value="10">10</option>
					<option value="20" selected="selected">20</option>
					<option value="30">30</option>
					<option value="50">50</option>
					<option value="100">100</option>
					<option value="200">200</option>
				</select> 
				<span><@label key="pagePanelMiddle.C">共</@label></span>
				<span>${totalCount!''}<@label key="item.C">条</@label></span>
			</div>
			<div class="pagination" targetType="navTab" totalCount="${totalCount!''}" numPerPage="20" pageNumShown="5" currentPage="1"></div>
		</div>
	</div>
	<div style="display: none">
		<div id="openWindows">
			<div class="pageContent">
				<div class="pageFormContent">
					<fieldset>
						<dl class="nowrap">
							<dt style="width: 50px;"><@label key="name.C,colon">名称：</@label></dt>
							<dd>
								<input class="required" id="newName" value="" type="text" maxlength="30" />
							</dd>
						</dl>
					</fieldset>
				</div>
				<div class="formBar">
					<ul>
						<li><div class="buttonActive" id="save">
								<div class="buttonContent">
									<button type="button" id="dialogOk"><@label key="ok.B">确定</@label></button>
								</div>
							</div></li>
						<li>
							<div class="buttonActiveGrey">
								<div class="buttonContent">
									<button type="button" id="dialogClose"><@label key="cancel.B">取消</@label></button>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</form>

<#macro createBar queryConditions ismore> <#list queryConditions as queryCondition> <#if (queryCondition.dataType=="STRING"||queryCondition.dataType=="TEXT")&&queryCondition.fieldName!="CREATEUSER"&&queryCondition.fieldName!="MODIFYUSER">
<li class="condition queryCondition" businessField="${queryCondition.businessField!''}" field="${queryCondition.fieldName!''}" text="${queryCondition.fieldLable!''}" type="${queryCondition.dataType!''}" operator="${queryCondition.operator!''}" fieldValue="${queryCondition.fieldValue!''}" startValue="${queryCondition.startValue!''}" endValue="${queryCondition.endValue!''}"><a href="#" class="drop">${queryCondition.fieldLable!''}：<span class="drop-text"> 所有</span></a> <#if ismore==1><a href="#" class="remove-filter" title="删除条件" style="display: inline;"><span class="aui-icon aui-icon-small aui-iconfont-remove condition-remove"></span></a></#if>
	<div class="dropdown dropdown-text">
		<div class="text-area">
			<select class="js-text-expression">
				<option value="CT"<#if queryCondition.operator?? && queryCondition.operator == "CT"> selected="selected"</#if>>包含</option>
				<option value="EQ"<#if queryCondition.operator?? && queryCondition.operator == "EQ"> selected="selected"</#if>>等于</option>
				<option value="BT"<#if queryCondition.operator?? && queryCondition.operator == "BT"> selected="selected"</#if>>介于</option>
			</select> <#if queryCondition.operator?? && queryCondition.operator == "BT"> <input type="text" class="textInput" value="${queryCondition.startValue!''}" /> <input type="text" class="textInput" value="${queryCondition.endValue!''}" /> <#else> <input type="text" class="textInput" value="${queryCondition.fieldValue!''}" /> <input hidden type="text" class="textInput" value="" /> </#if>
		</div>
	</div></li>
<#elseif (queryCondition.dataType=="STRING"||queryCondition.dataType=="TEXT")&&(queryCondition.fieldName=="CREATEUSER"||queryCondition.fieldName=="MODIFYUSER")>
<li class="condition queryCondition" businessField="${queryCondition.businessField!''}" field="${queryCondition.fieldName!''}" text="${queryCondition.fieldLable!''}" type="${queryCondition.dataType!''}" operator="${queryCondition.operator!''}" fieldValue="${queryCondition.fieldValue!''}" fieldValues="${queryCondition.fieldValuesStr!''}" startValue="${queryCondition.startValue!''}" endValue="${queryCondition.endValue!''}"><a href="#" class="drop">${queryCondition.fieldLable!''}：<span class="drop-text"> 所有</span></a> <#if ismore==1><a href="#" class="remove-filter" title="删除条件" style="display: inline;"><span class="aui-icon aui-icon-small aui-iconfont-remove condition-remove"></span></a></#if>
	<div class="dropdown">
		<div class="check-list-field-container">
			<input data-type="user" placeholder="查找用户..." class="aui-field check-list-field" id="assignee-input"> <span class="icon-default aui-icon aui-icon-small  noloading aui-iconfont-search"></span>
			<div class="user-div">
				<h5>已选中用户</h5>
				<ul class="aui-list-section checked-list-section">
					<#assign currentuser=0 /> <#if queryCondition.fieldValues?? > <#assign index=0 /> <#list queryCondition.fieldValues as fieldValue> <#if fieldValue=="#CURRENTUSER"> <#assign currentuser=1 />
					<li class='check-list-item' user="#CURRENTUSER"><label class='item-label current-user' val='#CURRENTUSER' title='当前用户'>当前用户</label> <span class='current-user-remove aui-icon aui-icon-small'></span></li> <#else> <#if queryCondition.userNames[index]!="">
					<li class='check-list-item' user="${fieldValue!''}"><label class='item-label current-user' val='${fieldValue!' '}' title='${queryCondition.userNames[index]!''}'>${queryCondition.userNames[index]!''}</label> <span class='current-user-remove aui-icon aui-icon-small'></span></li> </#if> </#if> <#assign index=index+1 /> </#list> </#if>
				</ul>
				<ul class="aui-list-section">
					<li class="check-list-item"><label class="item-label" title="当前用户" data-descriptor-title="当前用户"> <input type="checkbox" class='user-check' value="#CURRENTUSER"<#if currentuser==1>checked</#if>/>当前用户
					</label></li>
				</ul>
				<ul class="aui-list-section suggest-list-section">

				</ul>
			</div>
		</div>
	</div></li>
<#elseif queryCondition.dataType=="DATETIME"||queryCondition.dataType=="DATE">
<li class="condition queryCondition" businessField="${queryCondition.businessField!''}" field="${queryCondition.fieldName!''}" text="${queryCondition.fieldLable!''}" type="${queryCondition.dataType!''}" operator="${queryCondition.operator!''}" fieldValue="${queryCondition.fieldValue!''}" startValue="${queryCondition.startValue!''}" endValue="${queryCondition.endValue!''}" timeUnit="${queryCondition.timeUnit!''}"><a href="#" class="drop">${queryCondition.fieldLable!''}：<span class="drop-text"> 所有</span></a> <#if ismore==1><a href="#" class="remove-filter" title="删除条件" style="display: inline;"><span class="aui-icon aui-icon-small aui-iconfont-remove condition-remove"></span></a></#if>
	<div class="dropdown dropdown-date">
		<div class="js-picker-ui">
			<div class="field-group withinTheLast">
				<input type="radio" name="${queryCondition.fieldName!''}" class="js-dp-type-toggle" id="withinTheLastRadio"<#if queryCondition.operator?? && queryCondition.operator == "SC">checked</#if>><label for="withinTheLastRadio">在过去</label> <input data-type="number" class="js-val digits" type="text" maxlength="8" value="${queryCondition.fieldValue!''}"> <label for="withinTheLastRadio">&nbsp;</label> <select class="js-measurement">
					<option value="MINUTE"<#if queryCondition.timeUnit?? && queryCondition.timeUnit == "MINUTE"> selected="selected"</#if>>分</option>
					<option value="HOUR"<#if queryCondition.timeUnit?? && queryCondition.timeUnit == "HOUR"> selected="selected"</#if>>小时</option>
					<option value="DAY"<#if queryCondition.timeUnit?? && queryCondition.timeUnit == "DAY"> selected="selected"</#if>>天</option>
				</select><label for="withinTheLastRadio">之内</label>
			</div>
			<div class="field-group dateBetween">
				<input type="radio" name="${queryCondition.fieldName!''}" class="js-dp-type-toggle" id="dateBetweenRadio"<#if queryCondition.operator?? && queryCondition.operator == "BT">checked</#if>><label for="dateBetweenRadio">在&nbsp;</label>
				<div>
					<input type="text" dateGroup="${queryCondition.fieldName!''}" class="date from" readonly value="${queryCondition.startValue!''}" /> <a class="inputDateButton" href="javascript:;">选择</a>
				</div>
				<label for="dateBetweenRadio">&nbsp;和&nbsp;</label>
				<div>
					<input type="text" dateGroup="${queryCondition.fieldName!''}" class="date to" readonly" value="${queryCondition.endValue!''}" /> <a class="inputDateButton" href="javascript:;">选择</a>
				</div>
				<label for="dateBetweenRadio">之间</label>
			</div>
		</div>
	</div></li>
<#elseif queryCondition.dataType=="LONG"||queryCondition.dataType=="NUMBER">
<li class="condition queryCondition" businessField="${queryCondition.businessField!''}" field="${queryCondition.fieldName!''}" text="${queryCondition.fieldLable!''}" type="${queryCondition.dataType!''}" operator="${queryCondition.operator!''}" fieldValue="${queryCondition.fieldValue!''}" startValue="${queryCondition.startValue!''}" endValue="${queryCondition.endValue!''}"><a href="#" class="drop">${queryCondition.fieldLable!''}：<span class="drop-text"> 所有</span></a> <#if ismore==1><a href="#" class="remove-filter" title="删除条件" style="display: inline;"><span class="aui-icon aui-icon-small aui-iconfont-remove condition-remove"></span></a></#if>
	<div class="dropdown dropdown-number">
		<div class="number-area">
			<select class="js-number-expression">
				<option value="EQ"<#if queryCondition.operator?? && queryCondition.operator == "EQ"> selected="selected"</#if>>等于</option>
				<option value="BT"<#if queryCondition.operator?? && queryCondition.operator == "BT"> selected="selected"</#if>>介于</option>
			</select> <#if queryCondition.operator?? && queryCondition.operator == "BT"> <input type="text" class="textInput" data-type="number" value="${queryCondition.startValue!''}" /> <input type="text" class="textInput" data-type="number" value="${queryCondition.endValue!''}" /> <#else> <input type="text" class="textInput" data-type="number" value="${queryCondition.fieldValue!''}" /> <input hidden type="text" class="textInput" data-type="number" value="" /> </#if>
		</div>
	</div></li>
<#elseif queryCondition.dataType=="STATICOPTION"||queryCondition.dataType=="DYNAMICOPTION">
<li class="condition queryCondition" businessField="${queryCondition.businessField!''}" field="${queryCondition.fieldName!''}" text="${queryCondition.fieldLable!''}" type="${queryCondition.dataType!''}" operator="${queryCondition.operator!''}" fieldValue="${queryCondition.fieldValue!''}" startValue="${queryCondition.startValue!''}" endValue="${queryCondition.endValue!''}"><a href="#" class="drop">${queryCondition.fieldLable!''}：<span class="drop-text"> 所有</span></a> <#if ismore==1><a href="#" class="remove-filter" title="删除条件" style="display: inline;"><span class="aui-icon aui-icon-small aui-iconfont-remove condition-remove"></span></a></#if>
	<div class="dropdown">
		<div class="enum-area">
			<select>
				<option value=""></option> <#if queryCondition.businessFieldValueList??> <#list queryCondition.businessFieldValueList as businessFieldValue>
				<option value="${businessFieldValue.value!''}"<#if queryCondition.fieldValue?? && queryCondition.fieldValue == businessFieldValue.value> selected="selected"</#if>>${businessFieldValue.valueText!''}</option> </#list> </#if>
			</select>
		</div>
	</div></li>
</#if> </#list> </#macro>



<script src="${rc.getContextPath()}/manage/js/businessJs/customQuery.js?v=${ver}" type="text/javascript"></script>


